//
// Created by Administrator on 2023/9/14.
//

#include <iostream>
using namespace std;

int main()
{
    int n=10;
    int arr[n]={9,8,8,6,5,4,3,2,1,0};
    for (int i = 1; i < n ; ++i)
    {
        int j = i-1, cur = arr[i];
        while(arr[j]>cur && j>=0)
        {
            arr[j+1]=arr[j];
            --j;
        }
        arr[j+1]=cur;
    }
    for(int i:arr)
    {
        printf("%d ",i);
    }
    return 0;
}